import Vue from 'vue';
import Vuex from 'vuex';
import createPersiste from 'vue-savedata'
import * as actions from './actions'
Vue.use(Vuex);
const store = new Vuex.Store({
    state: {
        communalInfo:{},
    	userInfo:{},
        walletInfo:{}
    },
    
    mutations: {
    	update_permisison_list(state, payload) {
    		state.permissionList = payload
    	},
    	update_operation_list(state, payload) {
    		state.operationList = payload
    	},
        
        //获取七牛云信息
        SET_COMMUNAL_INFO(state, payload) {
        	state.communalInfo = payload;
        },
        
    	//获取个人信息
    	SET_USER_INFO(state, payload) {
    		state.userInfo = payload;
    	},
        
        //获取钱包余额
        SET_MY_WALLET(state, payload) {
        	state.walletInfo = payload;
        } 
    },
    actions,
    plugins: [createPersiste()]
});
export default store;
